/*
 * @Author: 锡诚 3343785462@qq.com
 * @Date: 2023-02-24 11:32:48
 * @LastEditors: 锡诚 3343785462@qq.com
 * @LastEditTime: 2023-03-07 08:38:00
 * @FilePath: \chengyuemo1\vue-project\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/IndexView.vue')
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/sort',
      name: 'sort',
      component: () => import('../views/SortView.vue')
    },
    {
      path: '/shoppingCart',
      name: 'shoppingCart',
      component: () => import('../views/ShoppingCartView.vue')
    },
    {
      path: '/index',
      name: 'index',
      component: () => import('../views/IndexView.vue')
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue')
    },
    {
      path: '/SortNavBar',
      name: 'SortNavBar',
      component: () => import('../views/SortNavBarView.vue')
    },
    {
      path: '/goods',
      name: 'goods',
      component: () => import('../views/GoodsView.vue')
    },
    {
      path: '/search',
      name: 'search',
      component: () => import('../views/SearchView.vue')
    },
    {
      path: '/my',
      name: 'my',
      component: () => import('../views/myView.vue')
    },
    {
      path: '/goodsview',
      name: 'goodsview',
      component: () => import('../views/GoodsView.vue')
    }


  ]
})

export default router
